-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: Setup new S2 docs website #8300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # package.json # packages/@react-spectrum/s2/package.json # packages/dev/parcel-resolver-optimize-locales/package.json # packages/dev/parcel-transformer-s2-icon/package.json # yarn.lock
# Conflicts: # packages/@react-spectrum/s2/package.json # packages/dev/docs/package.json # packages/dev/s2-icon-builder/package.json # yarn.lock
# Conflicts: # packages/@react-spectrum/s2/package.json
# Conflicts: # yarn.lock
REVERT THIS
Build successful! 🎉 |
This reverts commit 96474a4. # Conflicts: # packages/@react-aria/dnd/stories/Reorderable.tsx
This comment was marked as off-topic.
This comment was marked as off-topic.
# Conflicts: # packages/dev/s2-docs/package.json # packages/dev/s2-docs/src/CodePlatter.tsx # packages/dev/s2-docs/src/Layout.tsx # packages/dev/s2-docs/src/Nav.tsx # yarn.lock
Build successful! 🎉 |
Build successful! 🎉 |
@@ -10,6 +10,8 @@ | |||
* governing permissions and limitations under the License. | |||
*/ | |||
|
|||
'use client'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
due to how our build works, this won't actually affect our released packages at the moment, so it'll only be used by the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so deferring this conversation?
@@ -44,7 +44,8 @@ const modalOverlayStyles = style({ | |||
transitionDuration: { | |||
default: 250, | |||
isExiting: 130 | |||
} | |||
}, | |||
zIndex: 9999 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how we actually want to handle this, but it works for now. Our old isolation: isolate
trick doesn't work anymore because there is no top-level provider wrapper around the main page content in S2, so the modals/popovers are siblings of the reset of the page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooo, tricky... hmmmm
i know we don't like this, but maybe we should consider having our Provider be mandatory. people are already used to it and seem to be frequently reaching for it anyways.
though a wrench in that is that then if they use both a v3 and s2 provider, they'd get two levels of isolation, shouldn't be a problem, but depends if anything is placed in between
I've also seen groups using a number larger than this one... :(
@@ -68,16 +68,21 @@ export interface ScrollableProps<T extends Element> { | |||
onScroll?: (e: UIEvent<T>) => void | |||
} | |||
|
|||
type ClassNameOrFunction<T> = string | ((values: T & {defaultClassName: string | undefined}) => string); | |||
type StyleOrFunction<T> = CSSProperties | ((values: T & {defaultStyle: CSSProperties}) => CSSProperties | undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just to make the types render cleaner in docs prop tables. Actual types haven't changed.
Build successful! 🎉 |
@@ -1,3 +1,4 @@ | |||
'use client'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added 'use client'
to all starter kit examples, which is how users should generally implement our components as well.
Build successful! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -44,7 +44,8 @@ const modalOverlayStyles = style({ | |||
transitionDuration: { | |||
default: 250, | |||
isExiting: 130 | |||
} | |||
}, | |||
zIndex: 9999 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooo, tricky... hmmmm
i know we don't like this, but maybe we should consider having our Provider be mandatory. people are already used to it and seem to be frequently reaching for it anyways.
though a wrench in that is that then if they use both a v3 and s2 provider, they'd get two levels of isolation, shouldn't be a problem, but depends if anything is placed in between
I've also seen groups using a number larger than this one... :(
@@ -86,7 +86,6 @@ export interface PickerStyleProps { | |||
size?: 'S' | 'M' | 'L' | 'XL', | |||
/** | |||
* Whether the picker should be displayed with a quiet style. | |||
* @private |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will need to verify this is actually ready for use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's not ready about it? It's in Figma, and has been supported for a while. I'm not sure why it was private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't recall doing testing with it, that was all
@@ -10,6 +10,8 @@ | |||
* governing permissions and limitations under the License. | |||
*/ | |||
|
|||
'use client'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so deferring this conversation?
Each of these handlers receives a <TypeLink links={typesDocs.links} type={typesDocs.exports.PressEvent} />, which exposes information about the target and the type of event that triggered the interaction. See [usePress](usePress.html) for more details. | ||
|
||
```tsx render | ||
"use client"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this for our own rendering? or is this something that users should be paying attention to as well?
|
||
return ( | ||
<> | ||
<Button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where do the styles for this one come from? I assume Vanilla CSS example which only uses the data-* and dom structure and so that's how it works
@@ -0,0 +1,89 @@ | |||
// https://gist.github.com/rvaiya/4a2192df729056880a027789ae3cd4b7 | |||
// Author: Raheman Vaiya | |||
// License: WTFPL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add to LICENSE?
Build successful! 🎉 |
This comment was marked as off-topic.
This comment was marked as off-topic.
"generate:og": "node scripts/generateOg.mjs", | ||
"generate:md": "node scripts/generateMd.mjs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we'll run these with the docs build. I should also give these better names.
/** | ||
* Tabs organize content into multiple sections and allow users to navigate between them. The content under the set of tabs should be related and form a coherent unit. | ||
*/ | ||
export const Tabs = forwardRef(function Tabs(props: TabsProps, ref: DOMRef<HTMLDivElement>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: update to match the latest S2 tabs code.
<MenuItem key={item.id} id={item.id} href={`/${libraryKey}/${item.name}.html`} aria-label={item.name} textValue={item.name}> | ||
{item.thumbnail && <Image src={item.thumbnail.toString()} alt={item.name} />} | ||
<Text slot="label">{item.name}</Text> | ||
{item.description && <Text slot="description">{item.description}</Text>} | ||
</MenuItem> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: add real thumbnails and descriptions
|
||
let a = document.createElement('a'); | ||
a.href = URL.createObjectURL(blob); | ||
a.download = 'example.zip'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Custom name based on section title?
Sets up new docs website, built using S2 components and Parcel's react server components support. All content and website UI is early and subject to change, but we can get this in as a starting point.
Test old docs, starters, etc. to ensure nothing broke.